﻿@{
    var currentPage = ViewContext.RouteData.Values["Page"]?.ToString();
}

<aside class="admin-nav">
    <section class="admin-nav-section mt-3 mb-3">
        <div class="list-group list-group-flush me-1">
            <a asp-page="/Admin/Post"
               class="list-group-item list-group-item-action @(currentPage is "/Admin/Post" or "/Admin/EditPost" or "/Admin/Draft" or "/Admin/RecycleBin" ? "active" : null)" title="Manage posts link">
                <div class="positioning-region">
                    <div class="content-region">
                        <i class="bi-file-earmark-richtext admin-nav-icon"></i>
                        @SharedLocalizer["Posts"]
                    </div>
                </div>
            </a>
            <a asp-page="/Admin/BlogPage"
               class="list-group-item list-group-item-action @(currentPage is "/Admin/BlogPage" or "/Admin/EditPage" ? "active" : null)" title="Manage pages link">
                <div class="positioning-region">
                    <div class="content-region">
                        <i class="bi-file-earmark-post admin-nav-icon"></i>
                        @SharedLocalizer["Pages"]
                    </div>
                </div>
            </a>
            <a asp-page="/Admin/Category"
               class="list-group-item list-group-item-action @(currentPage is "/Admin/Category" ? "active" : null)">
                <div class="positioning-region">
                    <div class="content-region">
                        <i class="bi-folder2 admin-nav-icon" title="Manage categories link"></i>
                        @SharedLocalizer["Categories"]
                    </div>
                </div>
            </a>
            @if (BlogConfig.ContentSettings.CommentProvider == CommentProvider.BuiltIn)
            {
                <a asp-page="/Admin/Comments"
                   class="list-group-item list-group-item-action @(currentPage is "/Admin/Comments" ? "active" : null)">
                    <div class="positioning-region">
                        <div class="content-region">
                            <i class="bi-chat-left-text admin-nav-icon" title="Manage comments link"></i>
                            @SharedLocalizer["Comments"]
                        </div>
                    </div>
                </a>
            }
            <a asp-page="/Admin/Tags"
               class="list-group-item list-group-item-action @(currentPage is "/Admin/Tags" ? "active" : null)">
                <div class="positioning-region">
                    <div class="content-region">
                        <i class="bi-tag admin-nav-icon" title="Manage tags link"></i>
                        @SharedLocalizer["Tags"]
                    </div>
                </div>
            </a>
            <a asp-page="/Admin/Menu"
               class="list-group-item list-group-item-action @(currentPage is "/Admin/Menu" ? "active" : null)">
                <div class="positioning-region">
                    <div class="content-region">
                        <i class="bi-menu-button-wide admin-nav-icon" title="Manage menus link"></i>
                        @SharedLocalizer["Menus"]
                    </div>
                </div>
            </a>
            <a asp-page="/Admin/FriendLink"
               class="list-group-item list-group-item-action @(currentPage is "/Admin/FriendLink" ? "active" : null)">
                <div class="positioning-region">
                    <div class="content-region">
                        <i class="bi-link-45deg admin-nav-icon" title="Manage friend links"></i>
                        @SharedLocalizer["Friend links"]
                    </div>
                </div>
            </a>
            <a asp-page="/Admin/Mention"
               class="list-group-item list-group-item-action @(currentPage is "/Admin/Mention" ? "active" : null)">
                <div class="positioning-region">
                    <div class="content-region">
                        <i class="bi-arrow-left-right admin-nav-icon" title="Manage mention link"></i>
                        @SharedLocalizer["Mentions"]
                    </div>
                </div>
            </a>
        </div>
    </section>
</aside>